<?php 
$today = strtotime(date('Y/m/d'));
$_3dayAfter = $today + 259200;
?>
<div id="box_lichthidau_bongda" class="box_col_300 box_width_common left">
    <div class="txt_title_box">Lịch thi đấu</div>
    <div class="content_news">
        <div class="content_tab">
            <table class="tb_lichthidau">
                <tr class="top">
                    <td colspan="2"> V-League </td>
                </tr>
                <?php 
                $i = 1;
                $numMatch = 0;
                foreach ($this->vLeagueFixture as $fixture){
                    $date = $fixture['DatetimeHappen'] + 25200;
                    if ($date > $today && $date < $_3dayAfter){
                        $numMatch++;
                ?>
                <tr <?php echo $i % 2 == 0 ? 'class="chan"' : ''; ?>>
                    <td class="w80"><?php echo date('d/m H:i', $date);?></td>
                    <td class="w180"><?php echo $fixture['TeamName1'], ' - ', $fixture['TeamName2'] ?></td>
                </tr>
                <?php 
                    }
                $i++;
                }
                if (!$numMatch){
                    echo '<tr><td colspan="2" align="center"><b>Không có trận đấu trong 3 ngày tới</b></td></tr>';
                }
                ?>
            </table>
            <div class="txt_view_more"><a href="<?php echo BASE_URL, '/lich-thi-dau' ?>" class="txt_gray">Xem thêm</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
        </div>
    </div>
</div>